using System;
using UnityEngine;

[Serializable]
public class TiltLimit : MonoBehaviour
{
	public float rotateSpeed;

	public TiltLimit()
	{
		rotateSpeed = 1f;
	}

	public void Update()
	{
		float num = UnityEngine.Input.GetAxis("Vertical") * Time.deltaTime * rotateSpeed;
		float yAngle = UnityEngine.Input.GetAxis("Horizontal") * Time.deltaTime * rotateSpeed;
		Vector3 localEulerAngles = transform.localEulerAngles;
		if (!(localEulerAngles.y >= 65f))
		{
			transform.Rotate(0f, yAngle, 0f);
		}
		else
		{
			Vector3 localEulerAngles2 = transform.localEulerAngles;
			if (!(localEulerAngles2.y <= 295f))
			{
				transform.Rotate(0f, yAngle, 0f);
			}
		}
		Vector3 localEulerAngles3 = transform.localEulerAngles;
		if (!(localEulerAngles3.y < 65f))
		{
			Vector3 localEulerAngles4 = transform.localEulerAngles;
			if (!(localEulerAngles4.y >= 295f))
			{
				Vector3 localEulerAngles5 = transform.localEulerAngles;
				if (!(localEulerAngles5.y >= 180f))
				{
					float y = 64.9f;
					Vector3 localEulerAngles6 = transform.localEulerAngles;
					localEulerAngles6.y = y;
					Vector3 vector2 = transform.localEulerAngles = localEulerAngles6;
				}
				else
				{
					float y2 = 295.1f;
					Vector3 localEulerAngles7 = transform.localEulerAngles;
					localEulerAngles7.y = y2;
					Vector3 vector4 = transform.localEulerAngles = localEulerAngles7;
				}
			}
		}
		Vector3 localEulerAngles8 = transform.localEulerAngles;
		if (!(localEulerAngles8.x < 25f))
		{
			Vector3 localEulerAngles9 = transform.localEulerAngles;
			if (!(localEulerAngles9.x >= 295f))
			{
				Vector3 localEulerAngles10 = transform.localEulerAngles;
				if (!(localEulerAngles10.x >= 180f))
				{
					float x = 24.9f;
					Vector3 localEulerAngles11 = transform.localEulerAngles;
					localEulerAngles11.x = x;
					Vector3 vector6 = transform.localEulerAngles = localEulerAngles11;
				}
				else
				{
					float x2 = 295.1f;
					Vector3 localEulerAngles12 = transform.localEulerAngles;
					localEulerAngles12.x = x2;
					Vector3 vector8 = transform.localEulerAngles = localEulerAngles12;
				}
			}
		}
		Vector3 localEulerAngles13 = transform.localEulerAngles;
		if (localEulerAngles13.z != 0f)
		{
			int num2 = 0;
			Vector3 localEulerAngles14 = transform.localEulerAngles;
			localEulerAngles14.z = num2;
			Vector3 vector10 = transform.localEulerAngles = localEulerAngles14;
		}
	}

	public void Main()
	{
	}
}
